Optimal. Leaf size=20 \[ \frac {x^{1-n}}{(a+b) (1-n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.00, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {6, 12, 30}
\begin {gather*} \frac {x^{1-n}}{(1-n) (a+b)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 12
Rule 30
Rubi steps
\begin {align*} \int \frac {1}{a x^n+b x^n} \, dx &=\int \frac {x^{-n}}{a+b} \, dx\\ &=\frac {\int x^{-n} \, dx}{a+b}\\ &=\frac {x^{1-n}}{(a+b) (1-n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 20, normalized size = 1.00 \begin {gather*} \frac {x^{1-n}}{(a+b) (1-n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 19, normalized size = 0.95
method | result | size |
gosper | \(-\frac {x \,x^{-n}}{\left (-1+n \right ) \left (a +b \right )}\) | \(19\) |
risch | \(-\frac {x \,x^{-n}}{\left (-1+n \right ) \left (a +b \right )}\) | \(19\) |
norman | \(-\frac {x \,{\mathrm e}^{-n \ln \left (x \right )}}{a n +b n -a -b}\) | \(26\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 21, normalized size = 1.05 \begin {gather*} -\frac {x}{{\left (a {\left (n - 1\right )} + b {\left (n - 1\right )}\right )} x^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.33, size = 22, normalized size = 1.10 \begin {gather*} -\frac {x}{{\left ({\left (a + b\right )} n - a - b\right )} x^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 32 vs.
\(2 (10) = 20\).
time = 0.26, size = 32, normalized size = 1.60 \begin {gather*} \begin {cases} - \frac {x}{a n x^{n} - a x^{n} + b n x^{n} - b x^{n}} & \text {for}\: n \neq 1 \\\frac {\log {\left (x \right )}}{a + b} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.18, size = 19, normalized size = 0.95 \begin {gather*} -\frac {x^{1-n}}{\left (a+b\right )\,\left (n-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________